<template>
  <!--<div>登录成功了吗？</div>-->
  <div></div>
</template>
<script>
  import {mapActions} from 'vuex'
  export default {
    data () {
      return {
        ifSuccess: false
      }
    },
    async mounted () {
      const res = await this.scanloginCallback({code: this.$route.query.code, state: this.$route.query.state})
      if (res.data.code === 1) {
        localStorage.setItem('UBToken', res.data.data)
        this.$router.push({name: 'User'})
      }
    },
    methods: {
      ...mapActions(['scanloginCallback'])
    }
  }
</script>
<style lang="scss">
</style>
